import {baseURL} from '../config'
import axios from 'axios'

export const Axios = axios.create({
    timeout: 10 * 1000,
    baseURL : baseURL
})

export default {
    // 导出install方法，就可以在main.js中使用Vue.use()全局引入
    install: (Vue) => {
        Object.defineProperty(Vue.prototype, '$Axios', {
            value: Axios
        })
    }
}